<template>
  <div class="home">
    <child></child>

    <van-button round type="info" @click="remove">删除</van-button>
    <van-button round type="info" @click="remove2">删除</van-button>

    <!-- <img src="item.src" alt=""> -->
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";

// import { Dialog } from "vant";
export default {
  methods: {
    remove() {
      Dialog.confirm({
        title: "标题",
        message: "确认要删除吗",
      })
        .then(() => {
          // on confirm
          // this.list.splice(i,1)
        })
        .catch(() => {
          // on cancel
        });
    },
    remove2() {
      this.$dialog
        .confirm({
          title: "标题",
          message: "确认要删除吗",
        })
        .then(() => {
          // on confirm
          // this.list.splice(i,1)
          this.$toast("删除成功");
        })
        .catch(() => {
          // on cancel
        });
    },
  },
};
</script>
